package com.water.component.nacos.config;

import com.water.wfo.component.util.StringUtil;
import com.water.wfo.component.util.SystemPropertiesUtil;

import java.util.Properties;

/**
 * packageName com.water.component.nacos.config
 *
 * @author
 * @className NacosListServiceImpl(处以class为网)
 * @date 2025/3/13
 * @description T0D0
 */
public class NacosListServiceImpl implements NacosListService{

    /**
     * 分组
     */
    private static final String NACOS_CONFIG_GROUP = "WFO_GROUP";
    @Override
    public String groupName() {
        Properties properties = SystemPropertiesUtil.getSystemProperties();
        if(null != properties){
          String group = properties.getProperty("spring.cloud.nacos.config.group");
          if(StringUtil.isNotEmpty(group)){
              return group;
          }
        }
        return NACOS_CONFIG_GROUP;
    }

    @Override
    public String[] dataIdList() {
        return new String[]{"wfo-public.yaml","wfo-http.yaml","wfo-rmq.yaml","wfo-extra.yaml"};
    }
}
